﻿@inherits LayoutComponentBase
<CascadingAuthenticationState>
    <AuthorizeView>
        <Authorized>
            <Layout>
                <Sider Style="overflow: auto;height: 100vh;position: fixed;left: 0;">
                    <div class="logo">
                        进击吧！Blazor！
                    </div>
                    <Menu Theme="MenuTheme.Dark" Mode=@MenuMode.Inline>
                        <MenuItem RouterLink="/">
                            主页
                        </MenuItem>
                        <MenuItem RouterLink="/today" RouterMatch="NavLinkMatch.Prefix">
                            我的一天
                        </MenuItem>
                        <MenuItem RouterLink="/star" RouterMatch="NavLinkMatch.Prefix">
                            重要任务
                        </MenuItem>
                        <MenuItem RouterLink="/search" RouterMatch="NavLinkMatch.Prefix">
                            全部
                        </MenuItem>
                    </Menu>
                </Sider>
                <Layout Class="site-layout">
                    @Body
                </Layout>
            </Layout>
        </Authorized>
        <NotAuthorized>
            <ToDo.Client.Pages.Login></ToDo.Client.Pages.Login>
        </NotAuthorized>
    </AuthorizeView>
</CascadingAuthenticationState>


<style>
    .logo {
        text-align: center;
        vertical-align: middle;
        color: white;
        font-weight: bold;
        font-size: 18px;
        height: 32px;
        margin: 16px;
    }

    .site-layout {
        padding: 10px 20px 20px 220px;
        background-color: white;
        height: 100vh
    }
</style>
